
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3、获取个人信息 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="004-获取微信登录状态.html" />
    
    
    <link rel="prev" href="002-启动微信.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    WeChatPYAPI介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    1、常规
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="001-实例化API.html">
            
                <a href="001-实例化API.html">
            
                    
                    1、实例化API对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="002-启动微信.html">
            
                <a href="002-启动微信.html">
            
                    
                    2、启动微信
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.3" data-path="003-获取个人信息.html">
            
                <a href="003-获取个人信息.html">
            
                    
                    3、获取个人信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="004-获取微信登录状态.html">
            
                <a href="004-获取微信登录状态.html">
            
                    
                    4、获取微信登录状态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="005-退出登录.html">
            
                <a href="005-退出登录.html">
            
                    
                    5、退出登录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    2、拉取好友/群/成员
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="006-拉取列表.html">
            
                <a href="006-拉取列表.html">
            
                    
                    1、拉取列表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="007-获取群成员列表.html">
            
                <a href="007-获取群成员列表.html">
            
                    
                    2、获取群成员列表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="008-拉取企业微信列表.html">
            
                <a href="008-拉取企业微信列表.html">
            
                    
                    3、拉取企业微信列表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="009-获取企业群成员列表.html">
            
                <a href="009-获取企业群成员列表.html">
            
                    
                    4、获取企业群成员列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    3、发送消息类
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="010-发送文本消息.html">
            
                <a href="010-发送文本消息.html">
            
                    
                    1、发送文本消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="011-发送图片消息.html">
            
                <a href="011-发送图片消息.html">
            
                    
                    2、发送图片消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="012-发送文件视频消息.html">
            
                <a href="012-发送文件视频消息.html">
            
                    
                    3、发送文件/视频消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="013-群聊发送消息并且@指定群成员.html">
            
                <a href="013-群聊发送消息并且@指定群成员.html">
            
                    
                    4、群聊发送消息并且@指定群成员
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="014-发送好友名片.html">
            
                <a href="014-发送好友名片.html">
            
                    
                    5、发送好友名片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="015-发送卡片链接.html">
            
                <a href="015-发送卡片链接.html">
            
                    
                    6、发送卡片链接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="036-发送xml消息.html">
            
                <a href="036-发送xml消息.html">
            
                    
                    7、发送XML消息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    4、好友操作
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="016-添加好友.html">
            
                <a href="016-添加好友.html">
            
                    
                    1、添加好友
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="017-删除好友.html">
            
                <a href="017-删除好友.html">
            
                    
                    2、删除好友
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="018-同意添加好友请求.html">
            
                <a href="018-同意添加好友请求.html">
            
                    
                    3、同意添加好友请求
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="019-修改好友备注.html">
            
                <a href="019-修改好友备注.html">
            
                    
                    4、修改好友备注
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    5、群操作
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="020-创建群聊.html">
            
                <a href="020-创建群聊.html">
            
                    
                    1、创建群聊
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="021-修改群名称.html">
            
                <a href="021-修改群名称.html">
            
                    
                    2、修改群名称
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="022-发送群公告.html">
            
                <a href="022-发送群公告.html">
            
                    
                    3、发送群公告
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="023-邀请好友进群.html">
            
                <a href="023-邀请好友进群.html">
            
                    
                    4、邀请好友进群
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="024-踢出群成员.html">
            
                <a href="024-踢出群成员.html">
            
                    
                    5、踢出群成员
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="025-退出群聊.html">
            
                <a href="025-退出群聊.html">
            
                    
                    6、退出群聊
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="026-修改我在群里的昵称.html">
            
                <a href="026-修改我在群里的昵称.html">
            
                    
                    7、修改我在群里的昵称
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="027-显示隐藏群成员昵称.html">
            
                <a href="027-显示隐藏群成员昵称.html">
            
                    
                    8、显示/隐藏群成员昵称
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    6、控制类
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="028-开启关闭消息免打扰.html">
            
                <a href="028-开启关闭消息免打扰.html">
            
                    
                    1、开启/关闭消息免打扰
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="029-置顶取消置顶聊天.html">
            
                <a href="029-置顶取消置顶聊天.html">
            
                    
                    2、置顶/取消置顶聊天
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="031-收款.html">
            
                <a href="031-收款.html">
            
                    
                    3、收款
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="032-退款.html">
            
                <a href="032-退款.html">
            
                    
                    4、退款
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="035-开启关闭消息防撤回.html">
            
                <a href="035-开启关闭消息防撤回.html">
            
                    
                    5、开启/关闭消息防撤回
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" >
            
                <span>
            
                    
                    7、其他
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="030-关注公众号.html">
            
                <a href="030-关注公众号.html">
            
                    
                    关注公众号
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="033-保存图片.html">
            
                <a href="033-保存图片.html">
            
                    
                    保存图片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="034-同意好友邀请进群.html">
            
                <a href="034-同意好友邀请进群.html">
            
                    
                    同意好友邀请进群
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../消息类型.html">
            
                <a href="../消息类型.html">
            
                    
                    消息类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../常见问题及解决方案.html">
            
                <a href="../常见问题及解决方案.html">
            
                    
                    常见问题及解决方案
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >3、获取个人信息</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x83B7;&#x53D6;&#x4E2A;&#x4EBA;&#x4FE1;&#x606F;">&#x83B7;&#x53D6;&#x4E2A;&#x4EBA;&#x4FE1;&#x606F;</h1>
<ul>
<li>&#x8C03;&#x7528;&#x65B9;&#x6CD5;&#xFF1A;</li>
</ul>
<pre><code class="lang-python">w.get_self_info()
</code></pre>
<blockquote>
<p><span style="color: red;">&#x8BE5;&#x65B9;&#x6CD5;&#x5FC5;&#x987B;&#x8C03;&#x7528;&#x4E00;&#x6B21;&#xFF0C;&#x4E3A;&#x7684;&#x662F;&#x62FF;&#x5230;&#x4E2A;&#x4EBA;&#x5FAE;&#x4FE1;ID&#xFF0C;&#x540E;&#x7EED;&#x6240;&#x6709;&#x64CD;&#x4F5C;&#x90FD;&#x9700;&#x8981;&#x7528;&#x5230;</span></p>
</blockquote>
<ul>
<li>&#x8FD4;&#x56DE;&#x503C;&#xFF1A;<ul>
<li>&#x767B;&#x9646;&#x6210;&#x529F;&#x65F6;&#xFF1A;dict&#x7C7B;&#x578B;</li>
<li>&#x767B;&#x9646;&#x5931;&#x8D25;&#xFF1A;&#x8FD4;&#x56DE;None</li>
</ul>
</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:center">&#x53C2;&#x6570;</th>
<th style="text-align:center">&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">wx_id</td>
<td style="text-align:center">&#x5FAE;&#x4FE1;id</td>
</tr>
<tr>
<td style="text-align:center">wx_account</td>
<td style="text-align:center">&#x5FAE;&#x4FE1;&#x8D26;&#x53F7;</td>
</tr>
<tr>
<td style="text-align:center">nick_name</td>
<td style="text-align:center">&#x5FAE;&#x4FE1;&#x6635;&#x79F0;</td>
</tr>
<tr>
<td style="text-align:center">avatar_url</td>
<td style="text-align:center">&#x5FAE;&#x4FE1;&#x5934;&#x50CF;&#x5730;&#x5740;</td>
</tr>
<tr>
<td style="text-align:center">nation</td>
<td style="text-align:center">&#x56FD;&#x5BB6;</td>
</tr>
<tr>
<td style="text-align:center">province</td>
<td style="text-align:center">&#x7701;&#x4EFD;</td>
</tr>
<tr>
<td style="text-align:center">city</td>
<td style="text-align:center">&#x57CE;&#x5E02;</td>
</tr>
<tr>
<td style="text-align:center">mobile</td>
<td style="text-align:center">&#x624B;&#x673A;&#x53F7;</td>
</tr>
<tr>
<td style="text-align:center">gender</td>
<td style="text-align:center">&#x6027;&#x522B;</td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="002-启动微信.html" class="navigation navigation-prev " aria-label="Previous page: 2、启动微信">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="004-获取微信登录状态.html" class="navigation navigation-next " aria-label="Next page: 4、获取微信登录状态">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"3、获取个人信息","level":"1.2.3","depth":2,"next":{"title":"4、获取微信登录状态","level":"1.2.4","depth":2,"path":"教程/004-获取微信登录状态.md","ref":"教程/004-获取微信登录状态.md","articles":[]},"previous":{"title":"2、启动微信","level":"1.2.2","depth":2,"path":"教程/002-启动微信.md","ref":"教程/002-启动微信.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["expandable-chapters"],"pluginsConfig":{"expandable-chapters":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"教程/003-获取个人信息.md","mtime":"2021-08-05T18:44:08.140Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-08-15T21:49:47.376Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

